<template>
   <div>    
        <h2>params接收参数</h2>
        <li>消息编号: {{ $route.params.id }}</li>
        <li>消息标题: {{ $route.params.title }}</li>

        <h2>query接收参数</h2>
        <li>消息编号: {{ $route.query.id }}</li>
        <li>消息标题: {{ $route.query.title }}</li>

        <h2>props传过来的参数</h2>
        {{ id }} {{ title }}
   </div>
</template>

<script>
export default {
    name: 'stuDetail',
    props: ['id', 'title'],
    mounted () {
        console.log(this.$route)
        console.log(this.$router)
    }
}
</script>

<style>

</style>